﻿<!doctype html>
<html class="no-js">
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="description" content="">
  <meta name="keywords" content="">
  <meta name="viewport"
        content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <title>首页</title>

  <!-- Set render engine for 360 browser -->
  <meta name="renderer" content="webkit">

  <!-- No Baidu Siteapp-->
  <meta http-equiv="Cache-Control" content="no-siteapp"/>

  <link rel="icon" type="image/png" href="assets/i/favicon.png">

  <!-- Add to homescreen for Chrome on Android -->
  <meta name="mobile-web-app-capable" content="yes">
  <link rel="icon" sizes="192x192" href="assets/i/app-icon72x72@2x.png">

  <!-- Add to homescreen for Safari on iOS -->
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
  <link rel="apple-touch-icon-precomposed" href="assets/i/app-icon72x72@2x.png">

  <!-- Tile icon for Win8 (144x144 + tile color) -->
  <meta name="msapplication-TileImage" content="assets/i/app-icon72x72@2x.png">
  <meta name="msapplication-TileColor" content="#0e90d2">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <link rel="stylesheet" href="assets/css/amazeui.min.css">
   <link rel="stylesheet" href="assets/css/document.css">
   	
	
    <script src="assets/js/jquery.min.js"></script>
	<script src="assets/js/amazeui.js"></script>
	<script src="assets/js/memu.js"></script>
	<script src="assets/js/baiduTemplate.js"></script>
	<script src="assets/js/PublicFunction.js"></script>	

 

<style type="text/css">
.title_text{
	width:70px;
	margin:auto auto;
	text-align: center;
	font-size: 14px;
	
	


	
}

.title_img{
	width:70px;
	margin:auto auto;
	

	
}

</style>

</head>
<body>




<!-- 侧边栏内容 -->
<div id="doc-oc-demo2" class="am-offcanvas" >
  <div class="am-offcanvas-bar"  style="background-color: #2e76ac; width:80%;">
    <div class="am-offcanvas-content" style="width:100%; height:100%;margin: auto auto;  color: white; font-size: 14px;"  >
    
    	<div style="width:100px;height: 100px; margin: 10px auto; text-align: center; " >
  		  <img  class="am-circle user_ioc"  onerror="this.src='http://s.amazeui.org/media/i/demos/bw-2014-06-19.jpg?imageView/1/w/1000/h/1000/q/80'"src="" width="100" height="100"/>
  		  	<span id ="user_type"></span>
  		</div>
  	
		</br>
		<table class="am-table" >
   			 <tbody id ="div_userprofile">
   			 <script type="text/javascript" id='userprofile'> 
   		
        		<tr >
            		<td style="border-top: 0px;">CNPJ</td>
           		     <td style="border-top: 0px;">:</td>
            		<td style="border-top: 0px;"><%=cnpj%></td>
        		</tr>
        		<tr >
            		<td style="border-top: 0px;">地址</td>
           		     <td style="border-top: 0px;">:</td>
            		<td style="border-top: 0px;"><%=address%></td>
        		</tr>
        		<tr >
            		<td style="border-top: 0px;">联系人</td>
           		     <td style="border-top: 0px;">:</td>
            		<td style="border-top: 0px;"><%=realName%></td>
        		</tr>
        		<tr >
            		<td style="border-top: 0px;">固定电话</td>
           		     <td style="border-top: 0px;">:</td>
            		<td style="border-top: 0px;">xxxxxxxxxx</td>
        		</tr>
        		<tr >
            		<td style="border-top: 0px;">手机号码</td>
           		     <td style="border-top: 0px;">:</td>
            		<td style="border-top: 0px;"><%=phonenumber%></td>
        		</tr>
        		<tr >
            		<td style="border-top: 0px;">微信</td>
           		     <td style="border-top: 0px;">:</td>
            		<td style="border-top: 0px;"><%=wechat%></td>
        		</tr>
        		<tr >
            		<td style="border-top: 0px;">E_mail</td>
           		     <td style="border-top: 0px;">:</td>
            		<td style="border-top: 0px;"><%=email%></td>
        		</tr>
        		
        		<tr >
            		<td style="border-top: 0px;"></td>
           		     <td style="border-top: 0px;"></td>
            		<td style="border-top: 0px;" align="right"><button type="submit" class="am-btn am-btn-xs am-btn-success" onclick="gotoupdateprofile()">编辑资料</button></td>
        		</tr>
        		<tr >
            		<td style="border-top: 0px;"><A href="javascript:exit()">[-退出登录</A></td>
           		     <td style="border-top: 0px;"></td>
            		<td style="border-top: 0px;"></td>
        		</tr>
         </script> 
    		</tbody>
		</table>
		
		
		
    </div>
  </div>
</div>

	
<div id="parent" >
	<div style="width: 100%;background-color: #378ccc; height: 70px;">
		<div style="width: 30%; margin-left:10px; height: 68px; float: left;">
			<a href="#doc-oc-demo2" data-am-offcanvas="{ effect: 'push'}" id="title_img">
				<img id ="title_img" class="am-circle user_ioc" onerror="this.src='http://s.amazeui.org/media/i/demos/bw-2014-06-19.jpg?imageView/1/w/1000/h/1000/q/80'"src=""  width="68" height="68"/>
  			 </a>
  		 </div>
  		 <div style="width: 40%; height: 70px; float: left;" >
  		 	<div style="width: 70%; margin:auto auto; height: 70px; text-align: center;color: white; line-height: 70px;">
  		 			<h3>我的主页</h3>
  		 	</div>
		 </div>

	</div>
	
	</br>
	<div class="am-input-group"style="width: 90%; margin:auto auto;" >
      <span class="am-input-group-btn">
        <button class="am-btn am-btn-default am-round  am-btn-sm" type="button"  style="background-color:#ffffff; "  onClick="gotoSearchProduct('1')"><span class="am-icon-search"></span> </button>
      </span>
      <input type="text" class="am-form-field am-round  am-input-sm" id="keyword" placeholder="产品搜索">
    </div>
	</br>
	<div style="width: 85%; margin:auto auto;">
		<table class="am-table">
   			 <tbody >
        		<tr >
            		<td style="border-top: 0px; " class="Pa_1_2_0">
            			<a  href="javascript:gotoiMenu('msg')">
            				<div class="title_img"><img class="am-circle" src="assets/img/i_msg.png" width="70" height="70"/></div>
							<div class="title_text">信息</div>
						</a>
					</td>
            	
           		    <td style="border-top: 0px;"  class="Pa_1_2">
           		    	<a  href="javascript:gotoiMenu('mydocu')">
           		    		
           		    			<div class="title_img"><img class="am-circle" src="assets/img/i_cmp.png" width="70" height="70"/></div>
								<div class="title_text">我的产品库</div>
						</a>
					</td>
            		<td style="border-top: 0px;">
            			<a  href="javascript:gotoiMenu('importer')" class="Pa_2_0">
            				<div class="title_img"><img class="am-circle" src="assets/img/i_gz.png" width="70" height="70"/></div>
							<div class="title_text">我的关注</div>
						</a>
					</td>
        		</tr>
        		<tr >
            		<td style="border-top: 0px;">
            			<a href="javascript:gotoiMenu('generalize')" class="Pa_1_2">
            				<div class="title_img"><img class="am-circle" src="assets/img/msg_t.png" width="70" height="70"/></div>
            				<div class="title_text">推广</div>
            			</a>
            		</td>
           		    <td style="border-top: 0px;">
           		    	<a href="javascript:gotoiMenu('suggest')" class="Pa_1_0_2">
           		    		<div class="title_img"><img class="am-circle" src="assets/img/i_fk.png" width="70" height="70"/></div>
							<div class="title_text">意见反馈</div>
						</a>
					</td>
					<td style="border-top: 0px;">
           		    	<a href="javascript:gotoiMenu('newdocu')" class="Pa_1">
           		    		<div class="title_img"><img class="am-circle" src="assets/img/msg_d.png" width="70" height="70"/></div>
							<div class="title_text">到新柜</div>
						</a>
					</td>
					
				
            		 
        		</tr>
        		<tr>
        			<td style="border-top: 0px;" class="Pa_1">
           		    	<a href="javascript:gotoiMenu('arrive')">
           		    		<div class="title_img"><img class="am-circle" src="assets/img/i_a.png" width="70" height="70"/></div>
							<div class="title_text">到空运</div>
						</a>
					</td>
					
					<td style="border-top: 0px;">
           		    	<a href="javascript:gotoiMenu('promotion')" class="Pa_1">
           		    		<div class="title_img"><img class="am-circle" src="assets/img/msg_c.png" width="70" height="70"/></div>
							<div class="title_text">促销</div>
						</a>
					</td>
					
					<td style="border-top: 0px;" class ="Pa_1">
           		    	<a href="javascript:gotoiMenu('photographArr')">
           		    		<div class="title_img"><img class="am-circle" src="assets/img/i_p.png" width="70" height="70"/></div>
							<div class="title_text">到货单拍照</div>
						</a>
					</td>
        		</tr>
        
    		</tbody>
		</table>

	</div>

</div>	







<!-- 提示是否退出APP -->
<div class="am-modal am-modal-confirm" tabindex="-1" id="my-confirm">
  <div class="am-modal-dialog">
    <div class="am-modal-hd"></div>
    <div class="am-modal-bd">
      	是否退出
    </div>
    <div class="am-modal-footer">
      <span class="am-modal-btn" data-am-modal-cancel>取消</span>
      <span class="am-modal-btn" data-am-modal-confirm>确定</span>
    </div>
  </div>
</div>
<div style="display: none;">
<button
  type="button"
  class="am-btn am-btn-warning"
  id="doc-confirm-toggle">
  Confirm
</button>
</div>



<script type="text/javascript">
<!--页面初始化-->
function init(w ,h) {
	 actuator("intifunction()");
	 
		$('#doc-modal-list').find('.am-icon-close').add('#doc-confirm-toggle').
	    on('click', function() {
	      $('#my-confirm').modal({
	        relatedTarget: this,
	        onConfirm: function(options) {
	          var $link = $(this.relatedTarget).prev('a');
	          Public_method.finishActivity();
	        },
	        // closeOnConfirm: false,
	        onCancel: function() {
	          
	        }
	      });
	    });
	
  };
  
  
  function intifunction(){

		//获取用户信息
		var userJson = getUserProfileByUserName();
		var data = strToJson(userJson);
		//设置头像
		var user_ioc =   Public_method.getServerPath()+"upload/user/"+data.userName+"top.jpg";
		$(".user_ioc").attr("src",user_ioc);
		
		
		//设置身份
		$("#user_type").append(data.S_userType); 
		
		  
		/* var data={
				img:imgs
			} */
		//输出函数
		var bat=baidu.template;
		var title_img_html=bat('userprofile',data);
		//渲染
		document.getElementById('div_userprofile').innerHTML=title_img_html;
		 closeloading();
	  
  }
 /**返回主页**/
 function gotoMain(){
	 Public_method.gotoMain();
	 
 }
 /**展示info**/
 function shouinfo(or){
	 if(or=="right"){
		$("#title_img").click(); 
	 }
	 if(or=="left"){
		 $("#doc-oc-demo2").offCanvas('close')
	 }
 }
 function gotoiMenu(menu1){

	 Public_method.gotoMenu(menu1);
 }
function gotoupdateprofile(){
	IndexFunction.gotoupdateprofile();
	
}

//搜索产品
function gotoSearchProduct( page){
	 	var keyword =$("#keyword").val();
	  	 DucumentFunction.gotoSearchProduct(keyword,page,"def");
	 
}

//按返回键
function onBackPressed(){

	$("#doc-confirm-toggle").click();
	
}

</script>

</body>
</html>
